package com.znufe.exam.viewmodel.admin.classes;

import com.znufe.exam.domain.classes.StudentClassResponseObject;
import com.znufe.exam.utility.DateTimeUtil;
import com.znufe.exam.viewmodel.BaseVM;
import lombok.Data;

@Data
public class StudentClassResponseVM extends BaseVM {

    private Integer id;

    private String className;

    private String createUser;

    private String createTime;

    private Integer isEnabled;

    private String description;

    //班级人数 不入库
    private Integer stuCount;

    public static StudentClassResponseVM from(StudentClassResponseObject obj) {
        StudentClassResponseVM vm = modelMapper.map(obj, StudentClassResponseVM.class);
        vm.setCreateTime(DateTimeUtil.dateFormat(obj.getCreateTime()));
        return vm;
    }

}
